import 'package:custom_widgets/item_normal_widget.dart';
import 'package:flutter/material.dart';
import 'package:flutter_ui_demo/page/widget/Icons/ant_icons_data.dart';
import 'package:flutter_ui_demo/page/widget/Icons/cupertino_icons_data.dart';
import 'package:flutter_ui_demo/page/widget/Icons/feather_icons_data.dart';
import 'package:flutter_ui_demo/page/widget/Icons/font_awesome_data.dart';
import 'package:flutter_ui_demo/page/widget/Icons/material_icons.dart';
import 'package:flutter_ui_demo/page/widget/Icons/widget_icons_page.dart';

/// 图标库列表
class IconPage extends StatelessWidget {
  const IconPage({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("Icon"),
        centerTitle: true,
        elevation: 0.5,
      ),
      body: SafeArea(
        child: SingleChildScrollView(
          child: Column(
            children: <Widget>[
              ItemNormalWidget.item(
                title: "Material Deaign",
                onTap: () {
                  Navigator.push(context, MaterialPageRoute(builder: (context) {
                    return WidgetIconsPage(icons: MaterialIcons.icons);
                  }));
                },
              ),
              ItemNormalWidget.item(
                title: "Cupertino Icons",
                onTap: () {
                  Navigator.push(context, MaterialPageRoute(builder: (context) {
                    return WidgetIconsPage(icons: CupertinoIconsData.icons);
                  }));
                },
              ),
              ItemNormalWidget.item(
                title: "Font Awesome",
                onTap: () {
                  Navigator.push(context, MaterialPageRoute(builder: (context) {
                    return WidgetIconsPage(icons: FontAwesomeData.icons);
                  }));
                },
              ),
              ItemNormalWidget.item(
                title: "Feather Icons",
                onTap: () {
                  Navigator.push(context, MaterialPageRoute(builder: (context) {
                    return WidgetIconsPage(icons: FeatherIconsData.icons);
                  }));
                },
              ),
              ItemNormalWidget.item(
                title: "Ant Icons",
                onTap: () {
                  Navigator.push(context, MaterialPageRoute(builder: (context) {
                    return WidgetIconsPage(icons: AntIconsData.icons);
                  }));
                },
              ),
            ],
          ),
        ),
      ),
    );
  }
}
